<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title></title>
    {include file='header'}
     <style>
        .layui-form-label{width:180px;}
        .layui-input-block{margin-left:180px;}
    </style>
</head>

<body>
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a>首页</a>
            <a href="{:url('site')}">站点配置</a>
        </span>
        <div style="float: right;">
            <a class="layui-btn layui-btn-small" href="javascript:location.replace(location.href);" title="刷新">
                <i class="layui-icon layui-icon-refresh-1"></i></a>
        </div>
    </div>
    <div class="x-body">
        <form data-auto="true" action="{:request()->url()}" method="post"
            class='layui-form' autocomplete="off">
            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    填写数字，提成按每订单金额百分比计算
                </div>
            </div><div class="layui-row">
            {foreach $config as $v}
            
            <div class="layui-col-md6">
           <div class="layui-form-item">
                <label class="layui-form-label">{$v.name}</label>
                <div class="layui-input-block">
                    <input name="{$v.tag}" required placeholder="请输入配置值" value="{$v.value}" class="layui-input">
                    {if !empty($v.memo)}<p>{$v.memo}</p>{/if}
                </div>
            </div></div>
            {/foreach}
           </div>
                <div class="layui-form-item">
                <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                    <button class="layui-btn" type="submit">保存配置</button>
                </div>
                </div>
            </div>
        </form>
    </div>
    <script>
        layui.use(['form'], function(){
          var form = layui.form
          ,layer = layui.layer
        })
    </script>
</body>

</html>